import { createApp } from 'vue'
import App from './App.vue'




import { setItem, getItem, removeItem } from "./common/utils.js";
const app = createApp(App);
app.config.globalProperties.setItem = setItem;
app.config.globalProperties.getItem = getItem;
app.config.globalProperties.removeItem = removeItem;


import formatNum from '@/common/formatNum'; // 引入插件文件
// 使用插件
app.use(formatNum);

/**使用图片懒加载**/
import VueLazyload from "vue-lazyload";
app.use(VueLazyload, {
	loading: require("@/assets/imgs//loadImg.gif"),
	error: require("@/assets/imgs/error.png"),
	attempt: 6,
	observer: true,
});

// 分页组件
import Pagination from "@/components/common/Pagination";
app.component("Pagination", Pagination);

// 格式化时长
import formatDuration from "@/common/formatDuration";
app.use(formatDuration);

import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
app.use(ElementPlus);

import store from './store'
app.use(store)

import router from './router'
app.use(router)


app.mount('#app')